using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
	[Table("HrmEsMail")]
    public class EsMail
    {
		[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
		[DataMember, Display(Name = "MailId", ResourceType = typeof(Resources.EsMailsResource))]
        public int MailId { get; set; }

		[ForeignKey("MailType")]
		[DataMember, Display(Name = "MailTypeId", ResourceType = typeof(Resources.EsMailsResource))]
        public Nullable<int> MailTypeId { get; set; }

		[ForeignKey("Sender")]
		[DataMember, Display(Name = "SenderId", ResourceType = typeof(Resources.EsMailsResource))]
        public Nullable<int> SenderId { get; set; }

		[ForeignKey("Receiver")]
		[DataMember, Display(Name = "ReceiverId", ResourceType = typeof(Resources.EsMailsResource))]
        public Nullable<int> ReceiverId { get; set; }

		[ForeignKey("Req")]
		[DataMember, Display(Name = "ReqId", ResourceType = typeof(Resources.EsMailsResource))]
        public Nullable<int> ReqId { get; set; }

		[DataMember, Display(Name = "Descr", ResourceType = typeof(Resources.EsMailsResource))]
        public string Descr { get; set; }

		[DataMember, Display(Name = "RecordStatus", ResourceType = typeof(Resources.EsMailsResource))]
        public string RecordStatus { get; set; }

		[DataMember, Display(Name = "CreatedBy", ResourceType = typeof(Resources.EsMailsResource))]
        public Nullable<int> CreatedBy { get; set; }

		[DataMember, Display(Name = "CreatedWhen", ResourceType = typeof(Resources.EsMailsResource))]
        public Nullable<System.DateTime> CreatedWhen { get; set; }

		[DataMember, Display(Name = "UpdatedBy", ResourceType = typeof(Resources.EsMailsResource))]
        public Nullable<int> UpdatedBy { get; set; }

		[DataMember, Display(Name = "UpdatedWhen", ResourceType = typeof(Resources.EsMailsResource))]
        public Nullable<System.DateTime> UpdatedWhen { get; set; }

		public virtual HRM.EsMail MailType { get; set; }

		public virtual Employee Sender { get; set; }

        public virtual Employee Receiver { get; set; }

		public virtual BGM.Request Req { get; set; }

    }
}